class test():
    #两个属性
    def __init__(self, name, age):
        self.name = name
        self.age = age

    def hello(self):
        print("这是一个方法%s" % self.name)

if __name__ == '__main__':
    p2 = test(name="wxd",age=10)
    p2.hello()